<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>作业管理 - 数据库教学系统</title>
  <link rel="stylesheet" href="/src/style.css">
  <link rel="stylesheet" href="/node_modules/@fortawesome/fontawesome-free/css/all.min.css">
</head>
<body class="bg-gray-50">
  <div class="min-h-screen flex">
    <!-- 侧边栏 -->
    <aside class="w-64 bg-white shadow-md">
      <div class="p-4 border-b border-gray-200">
        <h2 class="text-xl font-bold text-gray-800">数据库教学系统</h2>
      </div>
      <nav class="p-4 space-y-2">
        <a href="/dashboard.html" class="nav-item flex items-center">
          <i class="fas fa-home mr-3"></i>仪表盘
        </a>
        <a href="/courses.html" class="nav-item flex items-center">
          <i class="fas fa-book mr-3"></i>课程列表
        </a>
        <a href="/lab.html" class="nav-item flex items-center">
          <i class="fas fa-flask mr-3"></i>实验环境
        </a>
        <a href="/assignments.html" class="nav-item active flex items-center">
          <i class="fas fa-tasks mr-3"></i>作业管理
        </a>
        <a href="/profile.html" class="nav-item flex items-center">
          <i class="fas fa-user mr-3"></i>个人资料
        </a>
      </nav>
    </aside>

    <!-- 主要内容区 -->
    <main class="flex-1 p-8">
      <div class="flex justify-between items-center mb-8">
        <h1 class="text-2xl font-bold text-gray-800">作业管理</h1>
        <button class="btn btn-primary">
          <i class="fas fa-plus mr-2"></i>布置新作业
        </button>
      </div>

      <!-- 作业统计 -->
      <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
        <div class="card bg-blue-50 border-blue-200">
          <div class="flex items-center space-x-4">
            <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center">
              <i class="fas fa-file-alt text-primary text-xl"></i>
            </div>
            <div>
              <h3 class="text-lg font-semibold text-gray-800">总作业数</h3>
              <p class="text-3xl font-bold text-primary">12</p>
            </div>
          </div>
        </div>

        <div class="card bg-green-50 border-green-200">
          <div class="flex items-center space-x-4">
            <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center">
              <i class="fas fa-check text-success text-xl"></i>
            </div>
            <div>
              <h3 class="text-lg font-semibold text-gray-800">已批改</h3>
              <p class="text-3xl font-bold text-success">8</p>
            </div>
          </div>
        </div>

        <div class="card bg-yellow-50 border-yellow-200">
          <div class="flex items-center space-x-4">
            <div class="w-12 h-12 rounded-full bg-yellow-100 flex items-center justify-center">
              <i class="fas fa-clock text-warning text-xl"></i>
            </div>
            <div>
              <h3 class="text-lg font-semibold text-gray-800">待批改</h3>
              <p class="text-3xl font-bold text-warning">4</p>
            </div>
          </div>
        </div>

        <div class="card bg-purple-50 border-purple-200">
          <div class="flex items-center space-x-4">
            <div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center">
              <i class="fas fa-chart-line text-purple-600 text-xl"></i>
            </div>
            <div>
              <h3 class="text-lg font-semibold text-gray-800">平均分</h3>
              <p class="text-3xl font-bold text-purple-600">85</p>
            </div>
          </div>
        </div>
      </div>

      <!-- 作业列表 -->
      <div class="card">
        <div class="table-container">
          <table class="table">
            <thead>
              <tr>
                <th>作业名称</th>
                <th>所属课程</th>
                <th>截止日期</th>
                <th>提交情况</th>
                <th>状态</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody class="divide-y divide-gray-200">
              <tr>
                <td class="font-medium">SQL查询练习</td>
                <td>数据库原理</td>
                <td>2023-09-15 23:59</td>
                <td>45/65</td>
                <td>
                  <span class="px-2 py-1 text-sm rounded-full bg-green-100 text-success">进行中</span>
                </td>
                <td>
                  <div class="flex space-x-2">
                    <button class="btn bg-blue-50 text-primary hover:bg-blue-100">
                      <i class="fas fa-eye"></i>
                    </button>
                    <button class="btn bg-green-50 text-success hover:bg-green-100">
                      <i class="fas fa-check"></i>
                    </button>
                  </div>
                </td>
              </tr>
              <tr>
                <td class="font-medium">数据库设计作业</td>
                <td>数据库设计</td>
                <td>2023-09-10 23:59</td>
                <td>48/48</td>
                <td>
                  <span class="px-2 py-1 text-sm rounded-full bg-gray-100 text-gray-600">已结束</span>
                </td>
                <td>
                  <div class="flex space-x-2">
                    <button class="btn bg-blue-50 text-primary hover:bg-blue-100">
                      <i class="fas fa-eye"></i>
                    </button>
                    <button class="btn bg-red-50 text-danger hover:bg-red-100">
                      <i class="fas fa-trash"></i>
                    </button>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </main>
  </div>
</body>
</html>